home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
050
/
turbwndo.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-05-02
|
2KB
|
74 lines
Program News;
TYPE
Titles = string[79];
VAR
m,x : integer;
PROCEDURE Border (x1,y1,x2,y2,Fgnd,Bkgnd:Integer; Title: Titles);
BEGIN
Window (x1,y1,x2,y1+1);
Textbackground(Bkgnd);
Gotoxy(1,1);
x := x2-x1;
Write('╔');
Textcolor(Fgnd);
IF length(title) > x THEN title[0] := chr(x-4);
Write(title);
FOR m := x1 + length(title)+1 to x2-1 DO Write('═');
Write('╗');
FOR m := 2 to y2-y1 DO
BEGIN
Window(x1,y1,x2,y1+m+1);
Gotoxy(1,m);
Write ('║');
Gotoxy(x2-x1+1,m);
Write ('║');
END;
Window(x1,y1,x2,y2+1);
Gotoxy(1,y2-y1+1);
Write('╚');
FOR m := x1+1 to x2-1 DO Write('═');
Write('╝');
END;
{==============================================}
PROCEDURE Box (x1,y1,x2,y2,Fgnd,Bkgnd:integer; title: Titles);
BEGIN
Border(x1,y1,x2,y2,Fgnd,Bkgnd,title);
Window(x1+1,y1+1,x2-1,y2-1);
Clrscr;
END;
{================================================}
BEGIN
Textcolor(red);
Box (4,1,66,5,red,cyan,'Box 1');
Gotoxy(1,2);
Write('Would you like to put windows in your TURBO PASCAL programs?');
Textcolor(green);
Delay(2000);
Box (1,8,25,14,green,blue,'Box 2');
Gotoxy(3,3);
Write ('It is quite simple.');
Delay(2000);
Box (26,8,79,14,yellow,green,'Box 3');
Gotoxy(3,3);
Write('All you have to do is list this program.');
Delay(2000);
Textcolor(red);
Box (1,15,79,24,red,yellow,'Box 4');
Gotoxy(1,4);
Write('The subroutine that generates these windows can be copied into your program.');
Delay(3500);
Textcolor(yellow);
Box (10,10,70,15,yellow,black,'** LAST BOX **');
Write(' That is all there is to it!!');
Gotoxy(1,3);
Delay(1000);
Textcolor(white);
Writeln;
Write(' Courtesy of J. Levitt, Fargo IBM-PC Users');
END.